package com.usian;

import com.usian.pojo.User;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(value = "provider")
public interface UserFeign {

    @RequestMapping("findById/{id}")
    public User findById(@PathVariable int id);

    @RequestMapping("findById")
    public User findByIds(@RequestParam int id);

    @RequestMapping("findByConsumer2")
    User findByConsumer2(@RequestBody User user);
}
